Optimal. Leaf size=125 \[ -\frac {(a+b x)^{1-n} (d e-c f) (e+f x)^{n-2}}{f (2-n) (b e-a f)}-\frac {(a+b x)^{1-n} (e+f x)^{n-1} (a d f (2-n)-b (c f+d (e-e n)))}{f (1-n) (2-n) (b e-a f)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 123, normalized size of antiderivative = 0.98, number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {79, 37} \[ \frac {(a+b x)^{1-n} (e+f x)^{n-1} (-a d f (2-n)+b c f+b d (e-e n))}{f (1-n) (2-n) (b e-a f)^2}-\frac {(a+b x)^{1-n} (d e-c f) (e+f x)^{n-2}}{f (2-n) (b e-a f)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 79
Rubi steps
\begin {align*} \int (a+b x)^{-n} (c+d x) (e+f x)^{-3+n} \, dx &=-\frac {(d e-c f) (a+b x)^{1-n} (e+f x)^{-2+n}}{f (b e-a f) (2-n)}-\frac {(-b c f-d (b e (1-n)+a f (-2+n))) \int (a+b x)^{-n} (e+f x)^{-2+n} \, dx}{f (-b e+a f) (-2+n)}\\ &=-\frac {(d e-c f) (a+b x)^{1-n} (e+f x)^{-2+n}}{f (b e-a f) (2-n)}+\frac {(b c f-a d f (2-n)+b d (e-e n)) (a+b x)^{1-n} (e+f x)^{-1+n}}{f (b e-a f)^2 (1-n) (2-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 84, normalized size = 0.67 \[ \frac {(a+b x)^{1-n} (e+f x)^{n-2} (a c f (n-1)-a d e+a d f (n-2) x+b c (f x-e (n-2))-b d e (n-1) x)}{(n-2) (n-1) (b e-a f)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.00, size = 326, normalized size = 2.61 \[ -\frac {{\left (a^{2} c e f - {\left (b^{2} d e f + {\left (b^{2} c - 2 \, a b d\right )} f^{2} - {\left (b^{2} d e f - a b d f^{2}\right )} n\right )} x^{3} - {\left (2 \, a b c - a^{2} d\right )} e^{2} - {\left (b^{2} d e^{2} - 2 \, a^{2} d f^{2} + {\left (3 \, b^{2} c - 2 \, a b d\right )} e f - {\left (b^{2} d e^{2} + b^{2} c e f - {\left (a b c + a^{2} d\right )} f^{2}\right )} n\right )} x^{2} + {\left (a b c e^{2} - a^{2} c e f\right )} n - {\left (2 \, b^{2} c e^{2} - a^{2} c f^{2} + {\left (2 \, a b c - 3 \, a^{2} d\right )} e f + {\left (a^{2} d e f + a^{2} c f^{2} - {\left (b^{2} c + a b d\right )} e^{2}\right )} n\right )} x\right )} {\left (f x + e\right )}^{n - 3}}{{\left (2 \, b^{2} e^{2} - 4 \, a b e f + 2 \, a^{2} f^{2} + {\left (b^{2} e^{2} - 2 \, a b e f + a^{2} f^{2}\right )} n^{2} - 3 \, {\left (b^{2} e^{2} - 2 \, a b e f + a^{2} f^{2}\right )} n\right )} {\left (b x + a\right )}^{n}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.16, size = 1085, normalized size = 8.68 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 160, normalized size = 1.28 \[ \frac {\left (b x +a \right ) \left (a d f n x -b d e n x +a c f n -2 a d f x -b c e n +b c f x +b d e x -a c f -a d e +2 b c e \right ) \left (b x +a \right )^{-n} \left (f x +e \right )^{n -2}}{a^{2} f^{2} n^{2}-2 a b e f \,n^{2}+b^{2} e^{2} n^{2}-3 a^{2} f^{2} n +6 a b e f n -3 b^{2} e^{2} n +2 a^{2} f^{2}-4 a b e f +2 b^{2} e^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (d x + c\right )} {\left (f x + e\right )}^{n - 3}}{{\left (b x + a\right )}^{n}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.80, size = 360, normalized size = 2.88 \[ \frac {b\,f\,x^3\,{\left (e+f\,x\right )}^{n-3}\,\left (b\,c\,f-2\,a\,d\,f+b\,d\,e+a\,d\,f\,n-b\,d\,e\,n\right )}{{\left (a\,f-b\,e\right )}^2\,{\left (a+b\,x\right )}^n\,\left (n^2-3\,n+2\right )}-\frac {x^2\,{\left (e+f\,x\right )}^{n-3}\,\left (2\,a^2\,d\,f^2-b^2\,d\,e^2-3\,b^2\,c\,e\,f-a^2\,d\,f^2\,n+b^2\,d\,e^2\,n+2\,a\,b\,d\,e\,f-a\,b\,c\,f^2\,n+b^2\,c\,e\,f\,n\right )}{{\left (a\,f-b\,e\right )}^2\,{\left (a+b\,x\right )}^n\,\left (n^2-3\,n+2\right )}-\frac {a\,e\,{\left (e+f\,x\right )}^{n-3}\,\left (a\,c\,f+a\,d\,e-2\,b\,c\,e-a\,c\,f\,n+b\,c\,e\,n\right )}{{\left (a\,f-b\,e\right )}^2\,{\left (a+b\,x\right )}^n\,\left (n^2-3\,n+2\right )}-\frac {x\,{\left (e+f\,x\right )}^{n-3}\,\left (a^2\,c\,f^2-2\,b^2\,c\,e^2+3\,a^2\,d\,e\,f-a^2\,c\,f^2\,n+b^2\,c\,e^2\,n-2\,a\,b\,c\,e\,f+a\,b\,d\,e^2\,n-a^2\,d\,e\,f\,n\right )}{{\left (a\,f-b\,e\right )}^2\,{\left (a+b\,x\right )}^n\,\left (n^2-3\,n+2\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________